/**
 * @file
 * @author dousha 
 * @date 2021/4/22.
 */

#ifndef PERISCOPE_STORAGE_H
#define PERISCOPE_STORAGE_H

#include <stdint.h>
#include <stddef.h>
#include "stm32f1xx_hal.h"

#define EEPROM_ADDR 0x50

extern void storage_init(I2C_HandleTypeDef *);

extern size_t storage_read(uint8_t *, uint16_t, uint16_t);

extern size_t storage_write(const uint8_t *, uint16_t, uint16_t);

#endif //PERISCOPE_STORAGE_H
